package com.itheimai02;

import java.util.TreeSet;

public class Work04Comparable {
    public static void main(String[] args) {
        TreeSet<Student> stu = new TreeSet<>();
        stu.add(new Student("Tom",20,90));
        stu.add(new Student("Jerry",22,95));
        stu.add(new Student("John",20,100));
        stu.add(new Student("Lily",22,100));
        stu.add(new Student("Lucy",22,90));
        stu.add(new Student("Kevin",22,90));
        for (Student student : stu) {
            System.out.println(student);
        }
    }
}
